<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ page import="com.hzqy.web.vo.PmsUserVo"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>分类详情</title>
<link rel="stylesheet" type="text/css"
	href="../../static/js/themes/public.css">
<link rel="stylesheet" type="text/css"
	href="../../static/js/themes/ddspstyle.css">
<link rel="stylesheet" type="text/css"
	href="../../static/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="../../static/js/themes/icon.css">
<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="../../static/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../static/js/jquery.validate.js"></script>
<script type="text/javascript" src="../../static/js/index.js"></script>
</head>
<%
String para =request.getParameter("parentid");
int f_catalog_id = 0;
if(para != null)
	f_catalog_id = Integer.valueOf(para);
PmsUserVo vo=((PmsUserVo)session.getAttribute("SESSION_USER"));
String roleId="0";
if(vo!=null){
	roleId=vo.getRoleIds();
}
%>
<body>
<div id="right" style="width: 100%; overflow: auto; float: right">
		<div id="container">
			<div class="editspace">
				<form id="contentForm" class="cmxform" enctype="multipart/form-data"
					name="formName">
					<legend>分类详情</legend>
					<%if("1".equals(roleId)||"2".equals(roleId)) {//超级管理员角色时%>
										<fieldset class="hide">
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										产品包：
									</td>
									<td width="70%">
										<font id="f_catalog_productid" style="width: 150px;"></font> 
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					<%}%>		
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										父级分类ID：
									</td>
									<td width="70%">
										<font id="f_catalog_parentid" style="width: 150px;"></font> 
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										分类ID：
									</td>
									<td width="70%">
										<font id="f_catalog_id" style="width: 150px;"></font> 
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										分类名称：
									</td>
									<td width="70%">
										<font id="f_catalog_name" style="width: 150px;"></font> 
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										分类排序：
									</td>
									<td width="70%">
										<font id="f_catalog_viewindex" style="width: 150px;"/> 
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										分类路径：
									</td>
									<td width="70%">
										<font id="f_catalog_url" style="width: 150px;"/> 
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										组织选择：
									</td>
									<td width="70%">
										<font id="f_catalog_company_name" style="width: 150px;"/>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										分类状态：
									</td>
									<td width="70%">
										<font id="f_catalog_status" style="width: 150px;"/>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<!-- <fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										业务类：
									</td>
									<td width="70%">
										<font style="width: 150px;" id="f_catalog_class"/>
									</td>
								</tr>
							</table>
						</div>
					</fieldset> -->
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="right">
										分类描述：
									</td>
									<td width="70%">
										<font cols="20" rows="4" style="resize:none; width:150px;" id="f_catalog_desc">
										</font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%" align="left">
										<jsp:include page="../../pictures/pictures_info_industry.jsp" flush="true">
											<jsp:param value="分类" name="picType"/>
											<jsp:param value="<%=f_catalog_id %>" name="f_cp_relationid"/>
										</jsp:include>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
				</form>
			</div>
		</div>
	</div> 
</body>
<script type="text/javascript">

window.onload=function(){
	var f_catalog_id = <%=f_catalog_id%>;
	$.ajax({
		url:"../../catalog/select_catalog.do?f_catalog_id="+f_catalog_id,
		success:function(data){
			data=JSON.parse(data);
			$("#f_catalog_id").html(data.f_catalog_id);
			$("#f_catalog_parentid").html(data.f_catalog_parentid);
			$("#f_catalog_name").html(data.f_catalog_name);
			$("#f_catalog_viewindex").html(data.f_catalog_viewindex);
			$("#f_catalog_url").html(data.f_catalog_url);
			$("#f_catalog_desc").html(data.f_catalog_desc);
			$("#f_catalog_class").html(data.f_catalog_class);
			$("#f_catalog_status").html(data.f_catalog_status==1?"有效":"无效");
			<%if("1".equals(roleId)||"2".equals(roleId)) {//超级管理员角色时%>
				$.ajax({
					url:"../../product/product_list.do",
					data: {f_sp_status: 1, f_sp_id: 0 ,page:1 ,rows:1000},
					success:function(data1) {
						data1 = JSON.parse(data1).rows;
						var str = "";
						for(var i=0;i<data1.length;i++) {
							if(data.f_catalog_productid==data1[i].f_sp_id){
								$("#f_catalog_productid").html(data1[i].f_sp_name);
								break;
							}
						}
					}
				}); 
			<%}%>	
			
			$.ajax({
				url:"../../pms/org_list.do",
				success:function(data1){
					var json=JSON.parse(data1);
					for(var i=0;i<json.length;i++){
						if(json[i].id==data.f_catalog_orgid){
							$("#f_catalog_company_name").html(json[i].name);
							return;
						}
					}
				}
			});
			
		}
	});
	
}
</script>
</html>